<div ref="J_siteHeader">
    <div class="header">
        <div id="J_topbarBannerWrapper"></div>
        <div class="site-topbar">
            <div class="container">
                <div class="topbar-nav">
                    <a rel="nofollow" href="javascript:void(0);">松勤商城</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);">企业团购</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);">资质证照</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);">协议规则</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);" class="topbar-download"  id="J_siteDownloadApp">下载app</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);">智能生活</a>
                </div>
                <div class="topbar-cart" id="J_miniCartTrigger">
                    <a rel="nofollow" class="cart-mini" id="J_miniCartBtn" href="javascript:void(0);">
                        <em class="iconfont-cart"></em><em class="iconfont-cart-full hide"></em>购物车<span
                            class="cart-mini-num J_cartNum"></span>
                    </a>

                    <div class="cart-menu " id="J_miniCartMenu">
                        <div class="menu-content">
                            <div class="loading">
                                <div class="loader"></div>
                            </div>
                            <ul class="cart-list hide" id="J_miniCartList"></ul>
                            <div class="cart-total clearfix hide" id="J_miniCartListTotal"></div>
                            <div class="msg msg-error hide"></div>
                            <div class="msg msg-empty hide">购物车中还没有商品，赶紧选购吧！</div>
                        </div>
                    </div>
                </div>
                <div class="topbar-info" id="J_siteUserInfo">

                    <span class="link" id="userLogout" >
                        <span class="link" id="nickname"></span>
                        <span class="sep">|</span>
                        <a rel="nofollow" class="link" onclick="logout()" href="javascript:void(0);" >注销</a>
                    </span>
                    <a rel="nofollow" id="userLogin" onclick="login()" class="link" href="javascript:;" >登录</a>
                    <span class="sep">|</span>
                </div>
            </div>
        </div>

        <div class="site-header  ">
            <div class="container">
                <div class="header-logo">
                    <a class="logo ir" href="b.html" title="松勤官网">松勤官网</a>
                </div>

                <div class="header-nav ">
                    <ul class="nav-list J_navMainList clearfix">

                        <li id="J_navCategory" class="nav-category">
                            <a class="link-category" href="javascript:void(0);"><span class="text">全部商品分类</span></a>
                        </li>
                        <li class="nav-item" data-index="0">
                            <a class="link" href="javascript:void(0);" >
                                <span class="text">松勤手机</span>
                            </a>
                        </li>

                        <li class="nav-item" data-index="3">
                            <a class="link" href="javascript:void(0);">
                                <span class="text">笔记本</span>
                            </a>
                        </li>

                        <li class="nav-item" data-index="4">
                            <a class="link" href="javascript:void(0);">
                                <span class="text">家电</span>
                            </a>
                        </li>

                    </ul>
                </div>

                <div class="header-search ">
                    <form id="J_searchForm" class="search-form clearfix" action="#"
                          method="get">
                        <label for="search" class="hide">站内搜索</label>
                        <a class="no-style-msq" data-log_code="bpm=28.265.3682762.1&cdm=0.0.0.0">
                            <input class="search-text" type="search" id="search" name="keyword"
                                   autocomplete="off" >
                        </a>
                        <a id="J_submitBtn" class="no-style-msq" >
                            <input type="submit" class="search-btn iconfont" value="&#xe616;">
                        </a>
                        <div class="search-hot-words">
                        </div>
                        <div id="J_keywordList" class="keyword-list hide">
                            <ul class="result-list">
                            </ul>
                        </div>
                    </form>
                </div>
                <div id="J_doodleWrapper"></div>
            </div>
            <div id="J_navMenu" class="header-nav-menu" style="display: none;">
                <div class="container"></div>
            </div>
        </div>
    </div>

</div>


<script>

    /*2.设置登录信息*/
    function setUser(user){
        if(user){
            $("#userTip").hide();
            $("#userLogin").hide();
            $("#nickname").html('欢迎您：'+user.nickname);
            $("#logStatus").val(1);//已经登录
        }else{
            $("#userLogout").hide();
            $("#logStatus").val(0);//未登录
        }
    }

    $(function(){
        var user={"nickname":"13588000000"}
        setUser(user);
    });

</script>


